import java.util.*;
public class exp1_3 {
    public static void main(String[] args){
        int N=100;
        int key=1;
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入数字：");
        String num = scanner.nextLine();
        int length = num.length();
        int [] a = new int [N];
        for (int i=0;i<=length-1;i++) {
            if ( num.charAt(i)<'0' || num.charAt(i)>'9') {
                System.out.println("输入的不是数字");
                key =0;
                break;
            }
            a[i] = num.charAt(i);
        }
        for (int i=0;i<=(length/2-1);i++ ) {
            if(a[i]!=a[length-i-1]) {
                key=0;
                break;
            }
        }
        if(key==1)
            System.out.println(num+"是回文数");
        else if(key==0)
            System.out.println(num+"不是回文数");
    }
}

